﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AddIn.EA.Architecture.ComponentLogic.StandardProject.Domains
{
    public class LayerService : BaseDomain
    {
        public LayerService(Int32 id, String description) : base(id, description) { }

        public static LayerService BusinessEntity = new LayerService(0, "BusinessEntity");
        public static LayerService BusinessLogic = new LayerService(1, "BusinessLogic");
        public static LayerService ResourceAccess = new LayerService(2, "ResourceAccess");
        public static LayerService ServiceContractImplementation = new LayerService(3, "ServiceContractImplementation");
        public static LayerService DataContract = new LayerService(4, "DataContract");

        public LayerService GetOne(int id)
        {
            return GetAll().Find(it => it.ID.CompareTo(id) == 0);
        }
        public List<LayerService> GetAll()
        {
            List<LayerService> list = new List<LayerService>();
            list.Add(BusinessEntity);
            list.Add(BusinessLogic);
            list.Add(ResourceAccess);
            list.Add(ServiceContractImplementation);
            list.Add(DataContract);
            return list;
        }
    }
}
